/*
 * Copyright (c) 2006, 2022, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

/**
 * <p>Project: javase202202 - Arr1
 * <p>Powered by Lisi On 2022-06-02 15:34:38
 * <p>Created by IntelliJ IDEA
 *

 * @version 1.0
 * @since 17
 */
public class Arr1 {
    public static void main(String[] args) {
        //数组声明(一维数组)，数组是固定长度，
        int[] a = new int[]{1,2,3};
        //数组声明，长度是3个元素，下标是0 1 2
        var i = new int[3];
        System.out.println(i[2]);

        //会报异常，下标超界
        //i[3] = 6;
        i[0] = 'o';
        System.out.println(i[0]);

        //i.length 属性
        //i.length() 方法
        //String有length______,数组对象有length_____。
        //3
        System.out.println(i.length);

        //7
        System.out.println("hello中国".length());

        int aa[];
        int [] bb;
        int[] cc;
    }
}
